package com.ruoyi.school.classhomework.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.school.classhomework.mapper.ClassesHomeworkMapper;
import com.ruoyi.school.classhomework.domain.ClassesHomework;
import com.ruoyi.school.classhomework.service.IClassesHomeworkService;
import com.ruoyi.common.core.text.Convert;

/**
 * 班级作业管理Service业务层处理
 * 
 * @author qiang
 * @date 2022-07-10
 */
@Service
public class ClassesHomeworkServiceImpl implements IClassesHomeworkService 
{
    @Autowired
    private ClassesHomeworkMapper classesHomeworkMapper;

    /**
     * 查询班级作业管理
     * 
     * @param id 班级作业管理主键
     * @return 班级作业管理
     */
    @Override
    public ClassesHomework selectClassesHomeworkById(Long id)
    {
        return classesHomeworkMapper.selectClassesHomeworkById(id);
    }

    /**
     * 查询班级作业管理列表
     * 
     * @param classesHomework 班级作业管理
     * @return 班级作业管理
     */
    @Override
    public List<ClassesHomework> selectClassesHomeworkList(ClassesHomework classesHomework)
    {
        return classesHomeworkMapper.selectClassesHomeworkList(classesHomework);
    }

    /**
     * 新增班级作业管理
     * 
     * @param classesHomework 班级作业管理
     * @return 结果
     */
    @Override
    public int insertClassesHomework(ClassesHomework classesHomework)
    {
        return classesHomeworkMapper.insertClassesHomework(classesHomework);
    }

    /**
     * 修改班级作业管理
     * 
     * @param classesHomework 班级作业管理
     * @return 结果
     */
    @Override
    public int updateClassesHomework(ClassesHomework classesHomework)
    {
        return classesHomeworkMapper.updateClassesHomework(classesHomework);
    }

    /**
     * 批量删除班级作业管理
     * 
     * @param ids 需要删除的班级作业管理主键
     * @return 结果
     */
    @Override
    public int deleteClassesHomeworkByIds(String ids)
    {
        return classesHomeworkMapper.deleteClassesHomeworkByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除班级作业管理信息
     * 
     * @param id 班级作业管理主键
     * @return 结果
     */
    @Override
    public int deleteClassesHomeworkById(Long id)
    {
        return classesHomeworkMapper.deleteClassesHomeworkById(id);
    }
}
